﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:TFSBuddy.Settings" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="TFSBuddy.MainWindow"
        Title="TFS Buddy" Height="681" Width="705" Loaded="Window_Loaded" IsEnabled="{Binding}" Icon="/TFSBuddy;component/Content/product_tn_1%5b1%5d.png">
	<Window.Resources>
		<local:Settings x:Key="SettingsDataSource" d:IsDataSource="True"/>
		<DrawingBrush x:Key="Cyan" Viewbox="0,0,25,25" ViewboxUnits="Absolute">
			<DrawingBrush.Drawing>
				<GeometryDrawing Brush="Cyan">
					<GeometryDrawing.Geometry>
						<EllipseGeometry Center="12.5,12.5" RadiusY="12" RadiusX="12"/>
					</GeometryDrawing.Geometry>
					<GeometryDrawing.Pen>
						<Pen Brush="Black" DashCap="Flat" EndLineCap="Flat" LineJoin="Miter" MiterLimit="10" StartLineCap="Flat" Thickness="1"/>
					</GeometryDrawing.Pen>
				</GeometryDrawing>
			</DrawingBrush.Drawing>
		</DrawingBrush>
		<DrawingBrush x:Key="Green" Viewbox="0,0,25,25" ViewboxUnits="Absolute">
			<DrawingBrush.Drawing>
				<GeometryDrawing Brush="Green">
					<GeometryDrawing.Geometry>
						<EllipseGeometry Center="12.5,12.5" RadiusY="12" RadiusX="12"/>
					</GeometryDrawing.Geometry>
					<GeometryDrawing.Pen>
						<Pen Brush="Black" DashCap="Flat" EndLineCap="Flat" LineJoin="Miter" MiterLimit="10" StartLineCap="Flat" Thickness="1"/>
					</GeometryDrawing.Pen>
				</GeometryDrawing>
			</DrawingBrush.Drawing>
		</DrawingBrush>
		<DrawingBrush x:Key="Magenta" Viewbox="0,0,25,25" ViewboxUnits="Absolute">
			<DrawingBrush.Drawing>
				<GeometryDrawing Brush="Magenta">
					<GeometryDrawing.Geometry>
						<EllipseGeometry Center="12.5,12.5" RadiusY="12" RadiusX="12"/>
					</GeometryDrawing.Geometry>
					<GeometryDrawing.Pen>
						<Pen Brush="Black" DashCap="Flat" EndLineCap="Flat" LineJoin="Miter" MiterLimit="10" StartLineCap="Flat" Thickness="1"/>
					</GeometryDrawing.Pen>
				</GeometryDrawing>
			</DrawingBrush.Drawing>
		</DrawingBrush>
		<DrawingBrush x:Key="White" Viewbox="0,0,25,25" ViewboxUnits="Absolute">
			<DrawingBrush.Drawing>
				<GeometryDrawing Brush="White">
					<GeometryDrawing.Geometry>
						<EllipseGeometry Center="12.5,12.5" RadiusY="12" RadiusX="12"/>
					</GeometryDrawing.Geometry>
					<GeometryDrawing.Pen>
						<Pen Brush="Black" DashCap="Flat" EndLineCap="Flat" LineJoin="Miter" MiterLimit="10" StartLineCap="Flat" Thickness="1"/>
					</GeometryDrawing.Pen>
				</GeometryDrawing>
			</DrawingBrush.Drawing>
		</DrawingBrush>
		<DrawingBrush x:Key="Yellow" Viewbox="0,0,25,25" ViewboxUnits="Absolute">
			<DrawingBrush.Drawing>
				<GeometryDrawing Brush="Yellow">
					<GeometryDrawing.Geometry>
						<EllipseGeometry Center="12.5,12.5" RadiusY="12" RadiusX="12"/>
					</GeometryDrawing.Geometry>
					<GeometryDrawing.Pen>
						<Pen Brush="Black" DashCap="Flat" EndLineCap="Flat" LineJoin="Miter" MiterLimit="10" StartLineCap="Flat" Thickness="1"/>
					</GeometryDrawing.Pen>
				</GeometryDrawing>
			</DrawingBrush.Drawing>
		</DrawingBrush>
		<DrawingBrush x:Key="Blue" Viewbox="0,0,25,25" ViewboxUnits="Absolute">
			<DrawingBrush.Drawing>
				<GeometryDrawing Brush="#FF0000FF">
					<GeometryDrawing.Geometry>
						<EllipseGeometry Center="12.5,12.5" RadiusY="12" RadiusX="12"/>
					</GeometryDrawing.Geometry>
					<GeometryDrawing.Pen>
						<Pen Brush="Black" DashCap="Flat" EndLineCap="Flat" LineJoin="Miter" MiterLimit="10" StartLineCap="Flat" Thickness="1"/>
					</GeometryDrawing.Pen>
				</GeometryDrawing>
			</DrawingBrush.Drawing>
		</DrawingBrush>
		<DrawingBrush x:Key="Red" Viewbox="0,0,25,25" ViewboxUnits="Absolute">
			<DrawingBrush.Drawing>
				<GeometryDrawing Brush="#FFFF3414">
					<GeometryDrawing.Geometry>
						<EllipseGeometry Center="12.5,12.5" RadiusY="12" RadiusX="12"/>
					</GeometryDrawing.Geometry>
					<GeometryDrawing.Pen>
						<Pen Brush="Black" DashCap="Flat" EndLineCap="Flat" LineJoin="Miter" MiterLimit="10" StartLineCap="Flat" Thickness="1"/>
					</GeometryDrawing.Pen>
				</GeometryDrawing>
			</DrawingBrush.Drawing>
		</DrawingBrush>
	</Window.Resources>
    <Grid Background="#FF2F3B60" DataContext="{Binding Source={StaticResource SettingsDataSource}}">
    	<Image HorizontalAlignment="Left" Height="25" Source="Content/product_tn_1[1].png" Stretch="Fill" VerticalAlignment="Top" Width="17.857" Margin="7,7,0,0"/>
    	<TextBlock Height="26" Margin="31,7,0,0" TextWrapping="Wrap" VerticalAlignment="Top" FontSize="16" Foreground="#FFBABABA" HorizontalAlignment="Left" Width="90"><Run Language="sv-se" Text="TFS Buddy"/></TextBlock>
    	<TabControl Margin="8,36,8,33.96">
            <TabItem Header="Subscriptions" Name="tabSubscriptions">
    			<Grid Background="#FFE5E5E5" d:LayoutOverrides="VerticalMargin">
                    <ListView Margin="8,121,8,179" Name="listviewSubscriptions" Height="240" IsEnabled="False">
    					<ListView.View>
    						<GridView>
    							<GridViewColumn Header="EventType" DisplayMemberBinding="{Binding EventType}"/>
    						</GridView>
    					</ListView.View>
    				</ListView>
    				<TextBlock HorizontalAlignment="Left" Height="16" Margin="10,0,0,155" TextWrapping="Wrap" VerticalAlignment="Bottom" Width="153.143" Text="EventType"></TextBlock>
                    <ComboBox x:Name="dropdownEventtypes" HorizontalAlignment="Left" Margin="10,0,0,129" VerticalAlignment="Bottom" Width="206" IsEnabled="False" />
    				<Button x:Name="buttonAddSubscription" Content="Add" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="75" Margin="0,0,360,129" Click="buttonAddSubscription_Click" IsEnabled="False" />
    				<Button x:Name="buttonRemoveSubscription" Content="Remove" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="75" Margin="0,0,279,129" Click="buttonRemoveSubscription_Click" IsEnabled="False" />
                    <TextBlock Height="23" HorizontalAlignment="Left" Margin="10,10,0,0" Text="Team Foundation Server Url" TextWrapping="Wrap" VerticalAlignment="Top" Width="154" />
                    <TextBox Height="24" HorizontalAlignment="Left" Margin="10,37,0,0" Name="textbox_ServerUrl" Text="{Binding Default.TFSUrl, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TextWrapping="Wrap" VerticalAlignment="Top" Width="394" />
                    <TextBlock Height="23" HorizontalAlignment="Left" Margin="10,65,0,0" Text="User ID" TextWrapping="Wrap" VerticalAlignment="Top" Width="154" />
                    <TextBox Height="24" HorizontalAlignment="Left" Margin="10,88,0,0" Name="textbox_UserID" Text="{Binding Default.TFSUserID, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TextWrapping="Wrap" VerticalAlignment="Top" Width="394" />
                    <Button Content="Connect to TFS" Height="23" HorizontalAlignment="Left" Margin="410,89,0,0" Name="buttonConnect" VerticalAlignment="Top" Width="114" Click="buttonConnect_Click" />
                </Grid>
    		</TabItem>
    		<TabItem Header="Actions" Name="tabActions">
    			<Grid Background="#FFE5E5E5">
                    <ComboBox x:Name="comboboxAction" Margin="8,8,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="339" ItemsSource="{Binding EventActionFilters, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" DisplayMemberPath="Name" SelectionChanged="comboboxAction_SelectionChanged" />
    				<ComboBox x:Name="comboboxEvent" Margin="8,99.84,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="339" SelectedItem="{Binding EventTypeString}" SelectionChanged="comboboxEvent_SelectionChanged" />
    				<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Event type" VerticalAlignment="Top" Margin="8,79.88,0,0"/>
    				<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Filter (Dynamic Linq)" VerticalAlignment="Top" Margin="8,125.8,0,0"/>
                    <TextBox x:Name="textboxFilter" TextWrapping="Wrap" VerticalAlignment="Top" Margin="8,145.76,0,0" HorizontalAlignment="Left" Width="339" DataContext="{Binding SelectedItem, ElementName=comboboxAction, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Text="{Binding Filter}"/>
    				<ListView Margin="8,208,8,54" ItemsSource="{Binding SelectedItem.States, ElementName=comboboxAction, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Name="listviewStates" Height="278">
    					<ListView.View>
    					<GridView>
    							<GridViewColumn Header="Head effect" DisplayMemberBinding="{Binding HeadEffect}"/>
                                <GridViewColumn Header="Body effect" DisplayMemberBinding="{Binding BodyEffect}"/>
								<GridViewColumn Header="Heart effect" DisplayMemberBinding="{Binding HeartEffect}"/>
								<GridViewColumn Header="Wing effect" DisplayMemberBinding="{Binding WingEffect}"/>
								<GridViewColumn Header="Duration" DisplayMemberBinding="{Binding DurationEffect}"/>
    						</GridView>
    					</ListView.View>
    				</ListView>
    				<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Bottom" Margin="8,0,0,32" Text="Head  effect"></TextBlock>
                    <ComboBox x:Name="comboboxHeadEffect" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="75" Margin="8,0,0,6" SelectedIndex="0" />
                    <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Bottom" Margin="89,0,0,32" Text="Body effect"/>
                    <ComboBox x:Name="comboboxBodyEffect" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="75" Margin="89,0,0,6" SelectedIndex="0" />
                    <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Bottom" Margin="168,0,0,32" Text="Heart effect"/>
                    <ComboBox x:Name="comboboxHeartEffect" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="75" Margin="168,0,0,6" SelectedIndex="0" />
                    <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Bottom" Margin="247,0,0,32" Text="Wing effect"/>
                    <ComboBox x:Name="comboboxWingEffect" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="75" Margin="247,0,0,6" SelectedIndex="0" />
                    <TextBlock TextWrapping="Wrap" VerticalAlignment="Bottom" Margin="331,0,229,32" Text="Duration" Width="97" ToolTip="The delay always occurs first" />
                    <ComboBox x:Name="comboboxDurationEffect" VerticalAlignment="Bottom" Margin="331,0,229,6" ToolTip="When using reset or delay effect no other effects can be added at the same time" Width="97" SelectedIndex="0" />
                    <Button x:Name="buttonAddEffect" Content="Add" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="75" Margin="0,0,145,6" Click="buttonAddEffect_Click" />
                    <Button x:Name="buttonRemoveEffect" Content="Remove" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="75" Margin="0,0,66,6" Click="buttonRemoveEffect_Click" />
                    <Button Content="New" Height="23" HorizontalAlignment="Left" Margin="353,8,0,0" Name="buttonNewEventAction" VerticalAlignment="Top" Width="75" Click="buttonNewEventAction_Click" />
                    <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Name" VerticalAlignment="Top" Margin="8,33.96,0,0"/>
                    <TextBox x:Name="textboxName" TextWrapping="Wrap" VerticalAlignment="Top" Margin="8,53.92,0,0" HorizontalAlignment="Left" Width="339" DataContext="{Binding SelectedItem, ElementName=comboboxAction, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Text="{Binding Name}"/>
                    <Button Content="Test" Height="23" HorizontalAlignment="Left" Margin="353,34,0,0" Name="buttonTest" VerticalAlignment="Top" Width="75" Click="buttonTest_Click" />
                    <TextBlock Height="23" HorizontalAlignment="Left" Margin="8,177,0,0" Name="textBlock1" Text="Repeat" VerticalAlignment="Top" />
                    <TextBox Height="23" HorizontalAlignment="Left" Margin="51,174,0,0" Name="textboxRepeat" DataContext="{Binding SelectedItem, ElementName=comboboxAction, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Text="{Binding Repeat}" VerticalAlignment="Top" Width="47" />
                    <TextBlock Height="23" HorizontalAlignment="Left" Margin="104,177,0,0" Name="textBlock2" Text="times" VerticalAlignment="Top" />
                </Grid>
    		</TabItem>
    	</TabControl>
    	<Button x:Name="buttonSave" Content="Save" HorizontalAlignment="Right" Margin="0,0,8,8" VerticalAlignment="Bottom" Width="75" Click="buttonSave_Click" />
        <TextBlock HorizontalAlignment="Left" Margin="13,0,0,4" Name="textblockMessage" Text="" Width="581" Foreground="White" Height="23" VerticalAlignment="Bottom" />
    </Grid>
</Window>
